# 定义学生类  ---- 生活中的学生信息表
class Student:
    name = None
    age = None

# 通过类创建一个学生对象  ----- 给xx发一张表格让他填写
stu1 = Student()
stu2 = Student()

# 为对象添加信息
# 1.张三要填写表格了
stu1.name = "张三"
stu1.age = 18 
stu1.gender = "男"
print(stu1)

stu2.name = "李四"
stu2.age = 20
stu2.gender = "男"
print(stu2)



class Phone:
    id = None 
    brand = None 
    color = None 

    # 定义构造方法   ----- 用于快速的创造对象
    def __init__(self,id,brand,color):
        print("开始调用构造方法创造对象")
        self.id = id
        self.brand = brand
        self.color = color 
        print("构造方法调用完毕，对象属性已赋值")
hw_phone = Phone(123,"华为","白色")






# class Car:
#     _color = None 

#     def get(self):
#         return self._color
    
#     def set(self,value):
#         self._color = value

